<template>
  <div class="apply">
    <Navigation :logoName="logoName" :routeInfo="routeInfo"></Navigation>
    <div class="formContent">
        <ArbitDetail :basicInfo="basicInfo"></ArbitDetail>
        <p class="line arbitline"><span class="title arbitline">立案部专员审核意见</span></p>
              <Form label-position="right" :label-width="120" class="viewform">
                  <!-- <FormItem label="利息比率核算">
                      <label>{{basicInfo&&basicInfo.interestRatio+'%'}}</label>
                  </FormItem> -->
                  <FormItem label="审批结果">
                      <label>{{basicInfo.secretaryReview&&basicInfo.secretaryReview.isApproval==1?'审核通过':(basicInfo.secretaryReview&&basicInfo.secretaryReview.isApproval==0?'不通过':'')}}</label>
                  </FormItem>
                  <FormItem label="适用程序">
                      <label>{{basicInfo.secretaryReview&&basicInfo.secretaryReview.applicableProcedure}}</label>
                  </FormItem>
                  <!-- <FormItem label="等级">
                      <label>{{basicInfo&&basicInfo.secretaryReview.level==1?'A级':'B级'}}</label>
                  </FormItem> -->
                  <FormItem label="审批员">
                      <label>{{basicInfo.secretaryReview&&basicInfo.secretaryReview.approvalName}}</label>
                  </FormItem>
              </Form>
        <div>
          <p class="line title arbitline">审核意见</p>
          <div class="verifyForm">
              <Form :model="formRight" label-position="right" :label-width="120">
                  
                  <FormItem label="审核意见">
                      <RadioGroup v-model="formRight.input1" vertical>
                          <Radio label="1">审核通过</Radio>
                          <Radio label="2">不通过</Radio>
                      </RadioGroup>
                      <Input style="width:200px;position: absolute;top: 28px;" v-model="formRight.input2"  v-show="formRight.input1=='1'?false:true" />
                      
                  </FormItem>
              </Form>
          </div>
          
        </div>
        <div class="show">
        <div class="btn-sty">
          <span class="btn btn-apply" @click="back">返回</span>
          <span class="btn btn-complete btn-arbit" @click="complete">完成</span>
        </div>
      </div>
      
    </div>
    
  </div>
</template>

<script>
import Navigation from '../common/navigation'
import ArbitDetail from '../common/arbitdetail'
export default {
  name: 'Verifydirector',
  data(){
     return {
        logoName:'仲裁申请审核',
        routeInfo:'首页/仲裁审核受理/仲裁申请审核',
        meansCorrect:'',
        meansWhole:'',
        approval_results:'',
        resaon:'',
        basicInfo:{},
        applyINfo:false,
        unapplyINfo:false,
        formRight: {
            input1: '',
            input2: ''
        },
        basicInfos:this.$route.params.caseno,
        unEvidence:false,
        evidence:[]
     }
  },
  props: {
    msg: String
  },
  watch:{
    formRight(){
      
    }
  },
  methods:{
    unEvidenceM(){
      this.unEvidence=!this.unEvidence;
    },
    back(){
      this.$router.push('/Syspage/VerifydirectorIndex')
    },
    complete(){
      if(this.formRight.input1){
          this.$http.post('/api'+this.urls.dirVerifyCase,{
            approval_results:Number(this.formRight.input1),
            director_status:Number(this.formRight.input1),
            reason:this.formRight.input2,
            caseNo:this.$route.params.caseno
          }).then((result)=>{
              if(result.data.code==200){
                this.$Message.success('审核成功');
                // setTimeout(()=>{
                    this.$router.push('/Syspage/VerifydirectorIndex');
                    // window.open('http://180.97.15.173:9180');
                // },500)
              }else{
                this.$Message.error('审核失败');
              }
          }) 
      }else{
          this.$Message.warning('审核信息不能为空');
      }
        
    },
    detail(){
      
    },
    cancel(){

    },
    handleSubmit () {
      // this.$router.push('/Syspage/ApplySecondForm')
        // this.$refs[name].validate((valid) => {
        //     if (valid) {
        //         this.$Message.success('Success!');
        //     } else {
        //         this.$Message.error('Fail!');
        //     }
        // })
    },
    applyIN(){
      this.applyINfo=!this.applyINfo;
    },
    unapplyIN(){
      this.unapplyINfo=!this.unapplyINfo;
    }
  },
  components:{Navigation,ArbitDetail},
  created(){
    this.$http.post('/api'+this.urls.getCaseDetail,{caseNo:this.$route.params.caseno}).then((result)=>{
          if(result.data.code==200){
              this.basicInfo=result.data.data;
          }
    })
  }
  // created(){
  //     this.$http.get('/api'+this.urls.getCaseDetail+this.$route.params.caseno).then((result)=>{
  //         if(result.data.code==200){
  //           this.basicInfo=result.data.data.directorCaseDetail;
  //           this.evidence=result.data.data.directorCaseDetail.evidence?result.data.data.directorCaseDetail.evidence.split(','):[]
  //         }
  //     }) 
  // }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .show{
    margin:0 20px;
    /* padding-top: 30px; */
  }
  .btn-sty{
    margin-bottom: 20px;
  }
</style>
